﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class ObsoletosFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As ObsoletosBE
        Dim tmpObsoletos As ObsoletosBE = New ObsoletosBE()
        Try
            With tmpObsoletos
                .Clave = convertDTFromDb.ConvertString(dr.Item("Clave"))
                .Costo = convertDTFromDb.ConvertDecimal(dr.Item("Costo"))
                .Descrip = convertDTFromDb.ConvertString(dr.Item("Descrip"))
                .Exist = convertDTFromDb.ConvertDecimal(dr.Item("Exist"))
                .Fam = convertDTFromDb.ConvertString(dr.Item("Fam"))
                .FUltC = convertDTFromDb.ConvertString(dr.Item("FUltC"))
                .FUltV = convertDTFromDb.ConvertString(dr.Item("FUltV"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .Importe = convertDTFromDb.ConvertDecimal(dr.Item("Importe"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))
               End With
            Return tmpObsoletos
        Catch ex As Exception
            Throw
        Finally
            tmpObsoletos = Nothing
        End Try
    End Function
End Class
